package com.main.hotel.repository;

import com.main.hotel.entity.Manager;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository

public interface ManagerRepository extends JpaRepository<Manager, Integer>,
        JpaSpecificationExecutor<Manager> {
    @Query(value = "select * from manager where id= ?1", nativeQuery = true)
    Manager getManagerById(Integer manager_id);

    @Query(value = "select * from manager where phone= ?1 and password= ?2", nativeQuery = true)
    Manager confirmManager(String phone,String password);
}
